package lanqiao.dontaiguihua.moni;
//求和
public class Lan3493 {
    public static void main(String[] args) {
        long  count=0;
        long num=20230409;
        for(int i=1;i<=20230408;i++){
            count+=i;
        }
        System.out.println(count);
        //System.out.println(num*(num-1)/2);

    }
}
/*
两种思路:
        (1):long型变量记录和,暴力循环求和;
        (2):从1到20230408:可得出20230409=1+20230408||2+20230408||+....+10115204.5+10115204.5
        可化简为有20230408/2个20230409;*/
